package org.feiye.studyday16.practice;

public class Market {
	String name;

	public Market(String name) {
		this.name = name;
	}

	public Goods sell(int money) {
		if (money > 20000) {
			return new Tvs("小米电视");
		} else if (money > 1000) {
			return new Foods("大米");
		}
		return null;
	}

	public static void main(String[] args) {
		Market m = new Market("小王");
		System.out.println(m.sell(221500));
	}
}
